package xyx.springboot.serviceimpl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import xyx.springboot.mapper.UserMapper;
import xyx.springboot.model.User;
import xyx.springboot.service.UserService;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    UserMapper userMapper;

    public void addUser(User user){
        userMapper.addUser(user);
    }

    public void deleteUser(int id){
        userMapper.deleteUser(id);
    }

    public void updateUser(User user){
        userMapper.updateUser(user);
    }

    public User selectUser(int id) {
        return userMapper.selectUser(id);
    }

}
